package com.arvato.wxwork.controller.front.member;



import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.arvato.minipro.bean.bean_dto.common.Result;
import com.arvato.wxwork.bean.bean_vo.member.WxworkMemberRightVo;
import com.arvato.wxwork.service.member.WxworkMemberRightService;

/**
 * 企业微信获取员工权益html链接Controller
 * @author ZHAN655
 */
@RestController
@RequestMapping("/wxwork/member")
public class WxworkMemberRightController{
	
	private Logger logger = LoggerFactory.getLogger(WxworkMemberRightController.class);

	@Autowired
	private WxworkMemberRightService wxworkMemberRightService;
	
	/**
	 * 根据品牌获取企业微信会员权益的链接
	 */
	@ResponseBody
	@RequestMapping(value="/right/getlink")
	public Result get(HttpServletRequest req, String brand) {
		WxworkMemberRightVo memberRightVo = wxworkMemberRightService.getMemberRightByBrand(brand);
		logger.info("请求获取会员权益链接：" + memberRightVo);
		return Result.success(memberRightVo);
	}
	
}
